/**
 * 
 */
package com.google.code.cisx.wfe.events;

import com.google.code.cisx.wfe.model.WorkItem;

/**
 * @author <a href='mailto:rthakur@bravurasolutions.com'>Rahul Thakur</a>
 * @since 1.0
 * @version $Id$
 */
public class WorkItemEvent extends TypedEvent<WorkItem> {

    public enum WorkItemEventType implements EventType {

        /**
         * Implies that a WorkItem has been activated for an open CaseImpl.
         */
        WORKITEM_ACTIVATED("Work Item Activated"),

        /**
         * Implies that the Workitem has been completed and is now inactive for
         * an open CaseImpl.
         */
        WORKITEM_DEACTIVATED("Work Item Deactivated");

        /**
         * Event expressed as String.
         */
        private String type;

        /**
         * @param type
         */
        private WorkItemEventType(String type) {
            this.type = type;
        }

        @Override
        public String asString() {
            return type;
        }

    }

    public WorkItemEvent(WorkItem source, EventType type) {
        super(source, type);
    }

}
